public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");

        Component L2=new ComponentComposite("我的作业");
        L2.addChild(new ComponentLeaf("作业1"));
        L2.addChild(new ComponentLeaf("作业2"));

        Component L2_1 =new ComponentComposite("我的代码");
        L2_1.addChild(new ComponentLeaf("代码1"));
        L2_1.addChild(new ComponentLeaf("代码2"));

        Component L1_1 =new ComponentComposite("学习");
        L1_1.addChild(L2_1);
        L1_1.addChild(L2);


        Component L3_1 =new ComponentComposite("我的视频");
        L3_1.addChild(new ComponentLeaf("攻壳机动队"));
        L3_1.addChild(new ComponentLeaf("高达"));

        Component L3_2 =new ComponentComposite("我的游戏");
        L3_2.addChild(new ComponentLeaf("战争雷霆"));
        L3_2.addChild(new ComponentLeaf("英雄联盟"));

        Component L1_2=new ComponentComposite("娱乐");
        L1_2.addChild(L3_1);
        L1_2.addChild(L3_2);

        Component top=new ComponentComposite("TOP");
        top.addChild(L1_1);
        top.addChild(L1_2);

        top.operation();


    }
}